ENT.Type = "anim"
ENT.Base = "base_gmodentity"
 
ENT.PrintName		= "ANC"
ENT.Author			= "x-quake"
ENT.Contact			= "NA"
ENT.Purpose			= "Anti-NC"
ENT.Instructions	= "..."


if SERVER then

	function ENT:ReplaceENT( ent )
		if ent:GetClass() == "prop_physics" then
			self.Entity:SetModel( ent:GetModel() )
			self.Entity:SetPos( ent:GetPos() )
			self.Entity:SetAngles( ent:GetAngles() )
			self.Entity:SetParent( ent )
			self.ENT = ent
			
			return true
		end
	end

	function ENT:Initialize()
		self.ENT = self.ENT or self:GetParent()
		if !self.ENT or !self.ENT:IsValid() then self:Remove() end
	
		self.Entity:PhysicsInit( SOLID_VPHYSICS )
		self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
		self.Entity:SetSolid( SOLID_VPHYSICS )
	
		self.Entity:SetTrigger( true )
		self.Entity:SetNotSolid( true )
	
	end

	function ENT:StartTouch( ent )
		ENTOWNER = ent:GetNWEntity( "clOwner" ) or ent
		if ent and ent:IsValid() and ENTOWNER:IsPlayer() then
			if !self.Owner or !self.Owner:IsValid() or !self.ENT.Options.Toggled then return end
			if self.ENT.Options.UseFriends and table.HasValue( FriendsTable, ENTOWNER ) then return end
			if self.ENT.Options.UseRanks and table.HasValue( self.ENT.Options.RANKS, ENTOWNER:RANK() ) then return end
			
			if ent:IsPlayer() then
				ent:SetMoveType( MOVETYPE_WALK )
			end
			
			ent:SetPos( ent:GetPos() + Vector:Normalize( ent:GetVelocity() ) * -500 )
		end
	end

end



if CLIENT then
	
	function ENT:Draw()
	
		//Called to draw the entity
		//Use ENT:DrawModel()
	
	end

end